<template>
    <div>
      <h1>登录页面</h1>
      <input type="text" v-model="username">
      <input type="password" v-model="password">
      <button @click="login">登录</button>
    </div>
</template>
  
  <script>
  export default {
    data() {
      return {
        username: 'admin',
        password: '123456'
      }
    },
    methods: {
      login() {
        if (this.username === 'admin' && this.password === '123456') {
            this.$router.push('/system');
        } else {
            alert('账号或密码错误');
        }
      }
    }
  }
  </script>
  